home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / MixedMode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  15.5 KB  |  792 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        MixedMode.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __MIXEDMODE__
  13. #define __MIXEDMODE__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. #endif
  19.  
  20. #ifndef __TRAPS__
  21. #include <Traps.h>
  22. #endif
  23.  
  24.  
  25. /*
  26. ##########################
  27. #  ————————————————————  #
  28. #  MIXED MODE CONSTANTS  #
  29. #  ————————————————————  #
  30. ##########################
  31. */
  32.  
  33.  
  34. //
  35.  
  36.  
  37. //    The current Routine Descriptor Version
  38.  
  39.  
  40. //
  41.  
  42. enum  {
  43.     kRoutineDescriptorVersion    = 7
  44. };
  45.  
  46.  
  47. //
  48.  
  49.  
  50. // The Calling Conventions
  51.  
  52.  
  53. //
  54.  
  55. typedef unsigned short CallingConventionType;
  56.  
  57. enum  {
  58.     kPascalStackBased            = (CallingConventionType)0,
  59.     kCStackBased                = (CallingConventionType)1,
  60.     kRegisterBased                = (CallingConventionType)2,
  61.     kD0DispatchedPascalStackBased = (CallingConventionType)8,
  62.     kD1DispatchedPascalStackBased = (CallingConventionType)12,
  63.     kD0DispatchedCStackBased    = (CallingConventionType)9,
  64.     kStackDispatchedPascalStackBased = (CallingConventionType)14,
  65.     kThinkCStackBased            = (CallingConventionType)5
  66. };
  67.  
  68.  
  69. //
  70.  
  71.  
  72. // ISA Types
  73.  
  74.  
  75. //
  76.  
  77. typedef unsigned char ISAType;
  78.  
  79. enum  {
  80.     kM68kISA                    = (ISAType)0,
  81.     kPowerPCISA                    = (ISAType)1
  82. };
  83.  
  84.  
  85. //
  86.  
  87.  
  88. // Constants for specifing 68k registers
  89.  
  90.  
  91. //
  92.  
  93. enum  {
  94.     kRegisterD0                    = 0,
  95.     kRegisterD1                    = 1,
  96.     kRegisterD2                    = 2,
  97.     kRegisterD3                    = 3,
  98.     kRegisterD4                    = 8,
  99.     kRegisterD5                    = 9,
  100.     kRegisterD6                    = 10,
  101.     kRegisterD7                    = 11,
  102.     kRegisterA0                    = 4,
  103.     kRegisterA1                    = 5,
  104.     kRegisterA2                    = 6,
  105.     kRegisterA3                    = 7,
  106.     kRegisterA4                    = 12,
  107.     kRegisterA5                    = 13,
  108.     kRegisterA6                    = 14,
  109. // A7 is the same as the PowerPC SP
  110.     kCCRegisterCBit                = 16,
  111.     kCCRegisterVBit                = 17,
  112.     kCCRegisterZBit                = 18,
  113.     kCCRegisterNBit                = 19,
  114.     kCCRegisterXBit                = 20
  115. };
  116.  
  117. typedef unsigned short registerSelectorType;
  118.  
  119.  
  120. //
  121.  
  122.  
  123. // SizeCodes we use everywhere
  124.  
  125.  
  126. //
  127.  
  128. enum  {
  129.     kNoByteCode                    = 0,
  130.     kOneByteCode                = 1,
  131.     kTwoByteCode                = 2,
  132.     kFourByteCode                = 3
  133. };
  134.  
  135.  
  136. /*
  137. ##§##
  138. ################################
  139. #  ——————————————————————————  #
  140. #  ROUTINE RECORD DEFINITIONS  #
  141. #  ——————————————————————————  #
  142. ################################
  143. */
  144.  
  145. typedef unsigned long ProcInfoType;
  146.  
  147.  
  148. // Routine Flag Bits
  149.  
  150. typedef unsigned short RoutineFlagsType;
  151.  
  152. enum  {
  153.     kProcDescriptorIsAbsolute    = (RoutineFlagsType)0x00,
  154.     kProcDescriptorIsRelative    = (RoutineFlagsType)0x01
  155. };
  156.  
  157. enum  {
  158.     kFragmentIsPrepared            = (RoutineFlagsType)0x00,
  159.     kFragmentNeedsPreparing        = (RoutineFlagsType)0x02
  160. };
  161.  
  162. enum  {
  163.     kUseCurrentISA                = (RoutineFlagsType)0x00,
  164.     kUseNativeISA                = (RoutineFlagsType)0x04
  165. };
  166.  
  167. enum  {
  168.     kPassSelector                = (RoutineFlagsType)0x0,
  169.     kDontPassSelector            = (RoutineFlagsType)0x08
  170. };
  171.  
  172. enum  {
  173.     kRoutineIsNotDispatchedDefaultRoutine = (RoutineFlagsType)0x0,
  174.     kRoutineIsDispatchedDefaultRoutine = (RoutineFlagsType)0x10
  175. };
  176.  
  177. #if defined(powerc) || defined (__powerc)
  178. #pragma options align=mac68k
  179. #endif
  180. struct RoutineRecord {
  181.     ProcInfoType                procInfo;                        // calling conventions
  182.     unsigned char                reserved1;                        // Must be 0
  183.     ISAType                        ISA;                            // Instruction Set Architecture
  184.     RoutineFlagsType            routineFlags;                    // Flags for each routine
  185.     ProcPtr                        procDescriptor;                    // Where is the thing we’re calling?
  186.     unsigned long                reserved2;                        // Must be 0
  187.     unsigned long                selector;                        // For dispatched routines, the selector
  188. };
  189. #if defined(powerc) || defined(__powerc)
  190. #pragma options align=reset
  191. #endif
  192.  
  193. typedef struct RoutineRecord RoutineRecord;
  194.  
  195. typedef RoutineRecord *RoutineRecordPtr, **RoutineRecordHandle;
  196.  
  197.  
  198. /*
  199. ##§##
  200. ####################################
  201. #  ——————————————————————————————  #
  202. #  ROUTINE DESCRIPTOR DEFINITIONS  #
  203. #  ——————————————————————————————  #
  204. ####################################
  205. */
  206.  
  207.  
  208. //
  209.  
  210.  
  211. // Definitions of the Routine Descriptor Flag Bits
  212.  
  213.  
  214. //
  215.  
  216. typedef unsigned char RDFlagsType;
  217.  
  218. enum  {
  219.     kSelectorsAreNotIndexable    = (RDFlagsType)0x00,
  220.     kSelectorsAreIndexable        = (RDFlagsType)0x01
  221. };
  222.  
  223.  
  224. //
  225.  
  226.  
  227. //  Routine Descriptor Structure
  228.  
  229.  
  230. //
  231.  
  232. #if defined(powerc) || defined (__powerc)
  233. #pragma options align=mac68k
  234. #endif
  235. struct RoutineDescriptor {
  236.     unsigned short                goMixedModeTrap;                // Our A-Trap
  237.     char                        version;                        // Current Routine Descriptor version
  238.     RDFlagsType                    routineDescriptorFlags;            // Routine Descriptor Flags
  239.     unsigned long                reserved1;                        // Unused, must be zero
  240.     unsigned char                reserved2;                        // Unused, must be zero
  241.     unsigned char                selectorInfo;                    // If a dispatched routine, calling convention, else 0
  242.     short                        routineCount;                    // Number of routines in this RD
  243.     RoutineRecord                routineRecords[1];                // The individual routines
  244. };
  245. #if defined(powerc) || defined(__powerc)
  246. #pragma options align=reset
  247. #endif
  248.  
  249. typedef struct RoutineDescriptor RoutineDescriptor;
  250.  
  251. #if    USESROUTINEDESCRIPTORS
  252.  
  253. /* Note: if USESROUTINEDESCRIPTORS is not true, UniversalProcPtr and
  254.         UniversalProcHandle are defined in Types.h */
  255.  
  256. typedef RoutineDescriptor *UniversalProcPtr, **UniversalProcHandle;
  257.  
  258. #endif
  259.  
  260. typedef RoutineDescriptor *RoutineDescriptorPtr, **RoutineDescriptorHandle;
  261.  
  262.  
  263. //
  264.  
  265.  
  266. // Macros for building static Routine Descriptors
  267.  
  268.  
  269. //
  270.  
  271.  
  272. // A macro which creates a static instance of a non dispatched routine descriptor
  273.  
  274. #define BUILD_ROUTINE_DESCRIPTOR(procInfo, procedure)  \
  275.     {                                \
  276.     _MixedModeMagic,                \
  277.     kRoutineDescriptorVersion,        \
  278.     kSelectorsAreNotIndexable,        \
  279.     0,                                \
  280.     0,                                \
  281.     0,                                \
  282.     0,                                \
  283.     {                                \
  284.     {                                \
  285.     (procInfo),                    \
  286.     0,                                \
  287.     kPowerPCISA,                    \
  288.     kProcDescriptorIsAbsolute |     \
  289.     kFragmentIsPrepared |            \
  290.     kUseNativeISA,                    \
  291.     (ProcPtr)(procedure),            \
  292.     0,                                \
  293.     0,                                \
  294.     },                                \
  295.     },                                \
  296.     }
  297.  
  298.  
  299. // a macro which creates a static instance of a fat routine descriptor
  300.  
  301. #define BUILD_FAT_ROUTINE_DESCRIPTOR(m68kProcInfo, m68kProcPtr, powerPCProcInfo, powerPCProcPtr)  \
  302.     {                                \
  303.     _MixedModeMagic,                \
  304.     kRoutineDescriptorVersion,        \
  305.     kSelectorsAreNotIndexable,        \
  306.     0,                                \
  307.     0,                                \
  308.     0,                                \
  309.     1,                                \
  310.     {                                \
  311.     {                                \
  312.     (m68kProcInfo),                \
  313.     0,                                \
  314.     kM68kISA,                        \
  315.     kProcDescriptorIsAbsolute |     \
  316.     kUseCurrentISA,                \
  317.     (ProcPtr)(m68kProcPtr),        \
  318.     0,                                \
  319.     0,                                \
  320.     },                                \
  321.     {                                \
  322.     (powerPCProcInfo),                \
  323.     0,                                \
  324.     kPowerPCISA,                    \
  325.     kProcDescriptorIsAbsolute |     \
  326.     kFragmentIsPrepared |            \
  327.     kUseCurrentISA,                \
  328.     (ProcPtr)(powerPCProcPtr),        \
  329.     0,                                \
  330.     0,                                \
  331.     },                                \
  332.     },                                \
  333.     }
  334.  
  335.  
  336. /*
  337. ##§##
  338. #################################
  339. #    —————————————————————————    #
  340. #     DEFINITIONS FOR PROCINFOS    #
  341. #    —————————————————————————    #
  342. #################################
  343. */
  344.  
  345.  
  346. //
  347.  
  348.  
  349. // Calling Convention Offsets
  350.  
  351.  
  352. //
  353.  
  354. #define kCallingConventionWidth 4
  355.  
  356. #define kCallingConventionPhase 0
  357.  
  358.  
  359. //
  360.  
  361.  
  362. // Result Offsets.  All Routines put their results in the same place.
  363.  
  364.  
  365. //
  366.  
  367. #define kResultSizeWidth 2
  368.  
  369. #define kResultSizePhase kCallingConventionWidth
  370.  
  371. #define kResultSizeMask 0x30
  372.  
  373.  
  374. //
  375.  
  376.  
  377. // Parameter offsets & widths
  378.  
  379.  
  380. //
  381.  
  382. #define kStackParameterWidth 2
  383.  
  384. #define kStackParameterPhase (kCallingConventionWidth + kResultSizeWidth)
  385.  
  386.  
  387. //
  388.  
  389.  
  390. // Register Result Location offsets & widths
  391.  
  392.  
  393. //
  394.  
  395. #define kRegisterResultLocationWidth 5
  396.  
  397. #define kRegisterResultLocationPhase (kCallingConventionWidth + kResultSizeWidth)
  398.  
  399.  
  400. //
  401.  
  402.  
  403. // Register Parameter offsets & widths
  404.  
  405.  
  406. //
  407.  
  408. #define kRegisterParameterWidth 5
  409.  
  410. #define kRegisterParameterPhase (kCallingConventionWidth + kResultSizeWidth + kRegisterResultLocationWidth)
  411.  
  412. #define kRegisterParameterSizePhase 0
  413.  
  414. #define kRegisterParameterWhichPhase 2
  415.  
  416.  
  417. //
  418.  
  419.  
  420. // Dispatched Stack Routine Selector offsets & widths
  421.  
  422.  
  423. //
  424.  
  425. #define kDispatchedSelectorSizeWidth 2
  426.  
  427. #define kDispatchedSelectorSizePhase (kCallingConventionWidth + kResultSizeWidth)
  428.  
  429.  
  430. //
  431.  
  432.  
  433. // Dispatched Stack Routine Parameter offsets
  434.  
  435.  
  436. //
  437.  
  438. #define kDispatchedParameterPhase (kCallingConventionWidth + kResultSizeWidth + kDispatchedSelectorSizeWidth)
  439.  
  440.  
  441. /*
  442. ##§##
  443. #
  444. #################################
  445. # ————————————————————————————— #
  446. # MACROS FOR BUILDING PROCINFOS #
  447. # ————————————————————————————— #
  448. #################################
  449. */
  450.  
  451.  
  452. //———————————————————————————————————————————————————————————————————————————————————————
  453.  
  454.  
  455. //    SIZE_CODE -     Return the size code for an object, given its size in bytes.
  456.  
  457.  
  458. //        size - size of an object in bytes
  459.  
  460.  
  461. //———————————————————————————————————————————————————————————————————————————————————————
  462.  
  463. #if forInterfacerTool
  464. #else
  465.  
  466. // A macro for return the size of any parameter or return result
  467.  
  468. #define SIZE_CODE(size)         \
  469.     (((size) == 4) ? kFourByteCode : (((size) == 2) ? kTwoByteCode : (((size) == 1) ? kOneByteCode : 0)))
  470.  
  471. #endif
  472.  
  473.  
  474. //———————————————————————————————————————————————————————————————————————————————————————
  475.  
  476.  
  477. //    RESULT_SIZE -     Return the result field of a ProcInfo, given the return object’s size.
  478.  
  479.  
  480. //                    This is the same for all ProcInfos
  481.  
  482.  
  483. //        sizeCode - size code
  484.  
  485.  
  486. //———————————————————————————————————————————————————————————————————————————————————————
  487.  
  488. #if forInterfacerTool
  489. #else
  490. #define RESULT_SIZE(sizeCode)     \
  491.     ((ProcInfoType)(sizeCode) << kResultSizePhase)
  492.  
  493. #endif
  494.  
  495.  
  496. //———————————————————————————————————————————————————————————————————————————————————————
  497.  
  498.  
  499. //    STACK_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo, for a simple,
  500.  
  501.  
  502. //                                non-dispatched, stack based routine.
  503.  
  504.  
  505. //        whichParam - which parameter
  506.  
  507.  
  508. //        sizeCode - size code
  509.  
  510.  
  511. //———————————————————————————————————————————————————————————————————————————————————————
  512.  
  513. #if forInterfacerTool
  514. #else
  515. #define STACK_ROUTINE_PARAMETER(whichParam, sizeCode)  \
  516.     ((ProcInfoType)(sizeCode) << (kStackParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
  517.  
  518. #endif
  519.  
  520.  
  521. //———————————————————————————————————————————————————————————————————————————————————————
  522.  
  523.  
  524. //    DISPATCHED_STACK_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo, for 
  525.  
  526.  
  527. //                                            a dispatched, stack based routine.  The same
  528.  
  529.  
  530. //                                            macro is used regardless of the type of
  531.  
  532.  
  533. //                                            dispatching.
  534.  
  535.  
  536. //        whichParam - which parameter
  537.  
  538.  
  539. //        sizeCode - size code
  540.  
  541.  
  542. //———————————————————————————————————————————————————————————————————————————————————————
  543.  
  544. #if forInterfacerTool
  545. #else
  546. #define DISPATCHED_STACK_ROUTINE_PARAMETER(whichParam, sizeCode)  \
  547.     ((ProcInfoType)(sizeCode) << (kDispatchedParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
  548.  
  549. #endif
  550.  
  551.  
  552. //———————————————————————————————————————————————————————————————————————————————————————
  553.  
  554.  
  555. //    DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE -    Return a the selector size field of a ProcInfo
  556.  
  557.  
  558. //                                                for a dispatched, stack based routine.  The
  559.  
  560.  
  561. //                                                same macro is used regardless of the type of
  562.  
  563.  
  564. //                                                dispatching.
  565.  
  566.  
  567. //        sizeCode - size code 
  568.  
  569.  
  570. //———————————————————————————————————————————————————————————————————————————————————————
  571.  
  572. #if forInterfacerTool
  573. #else
  574. #define DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE(sizeCode)  \
  575.     ((ProcInfoType)(sizeCode) << kDispatchedSelectorSizePhase)
  576.  
  577. #endif
  578.  
  579.  
  580. //———————————————————————————————————————————————————————————————————————————————————————
  581.  
  582.  
  583. //    REGISTER_RESULT_LOCATION -            Return the Result Location field of a ProcInfo, 
  584.  
  585.  
  586. //                                        given the location.
  587.  
  588.  
  589. //        $1 - which register
  590.  
  591.  
  592. //———————————————————————————————————————————————————————————————————————————————————————
  593.  
  594. #if forInterfacerTool
  595. #else
  596. #define REGISTER_RESULT_LOCATION(whichReg)  \
  597.     ((ProcInfoType)(whichReg) << kRegisterResultLocationPhase)
  598.  
  599. #endif
  600.  
  601.  
  602. //———————————————————————————————————————————————————————————————————————————————————————
  603.  
  604.  
  605. //    REGISTER_ROUTINE_PARAMETER -    Return a parameter field of a ProcInfo for a 
  606.  
  607.  
  608. //                                    register based routine.
  609.  
  610.  
  611. //        $1 - which parameter
  612.  
  613.  
  614. //        $2 - which register
  615.  
  616.  
  617. //        $3 - size code
  618.  
  619.  
  620. //———————————————————————————————————————————————————————————————————————————————————————
  621.  
  622. #if forInterfacerTool
  623. #else
  624. #define REGISTER_ROUTINE_PARAMETER(whichParam, whichReg, sizeCode)  \
  625.     ((((ProcInfoType)(sizeCode) << kRegisterParameterSizePhase) | ((ProcInfoType)(whichReg) << kRegisterParameterWhichPhase)) <<  \
  626.     (kRegisterParameterPhase + (((whichParam) - 1) * kRegisterParameterWidth)))
  627.  
  628. #endif
  629.  
  630.  
  631. /*
  632. ##§## */
  633.  
  634.  
  635. ///
  636.  
  637.  
  638. ///
  639.  
  640.  
  641. ///        SPECIAL CASE CONSTANTS
  642.  
  643.  
  644. ///        ——————————————————————
  645.  
  646.  
  647. ///
  648.  
  649.  
  650. /*
  651.     Explanation of special cases:
  652.     —————————————————————————————
  653.     High Hook & Caret Hook -  (see I-379)
  654.         C calling conventions, Rect on stack, pointer in A3, no return value
  655.     EOL Hook - (see VI-15-26)
  656.         Register-based; inputs in D0, A3, A4; 
  657.         output is Z flag of status register
  658.     Width Hook - (see VI-15-27)
  659.         Register-based; inputs in D0, D1, A0, A3, A4; output in D1 
  660.     NWidth Hook - (see VI-15-27)
  661.         Register-based; inputs in D0, D1, D2, A0, A2, A3, A4; output in D1 
  662.     TextWidthHook - (see VI-15-28)
  663.         Register-based; inputs in D0, D1, A0, A3, A4; output in D1 
  664.     DrawHook - (see VI-15-28)
  665.         Register-based; inputs in D0, D1, A0, A3, A4; no output
  666.     HitTestHook - (See VI-15-29)
  667.         Register-based; inputs in D0, D1, D2, A0, A3, A4; outputs in D0, D1, D2
  668.     FindWord -  (see VI-15-30)
  669.         Register-based; inputs in D0, D2, A3, A4; outputs in D0, D1
  670.     ADBRoutines - (see V-371)
  671.         Register-based; inputs in A0, A1, A2, D0; no outputs
  672.     ProtocolHandler - (see II-326)
  673.         Register-based; inputs in A0, A1, A2, A3, A4, D1.w; output in Z 
  674.     SocketListener - (see II-329)
  675.         Register-based; inputs in A0, A1, A2, A3, A4, D0.b, D1.w; output in Z 
  676.     Reclac - (see I-391)
  677.         Register-based; inputs in A3, D7; outputs in D2, D3, D4
  678.     DoText - (see I-391)
  679.         Register-based; inputs in A3, D3, D4, D7; outputs in A0, D0
  680.     GNEFilterProc - (see tech note 85)
  681.         Register & Stack Based; inputs in A1, D0 & on the stack; outputs on the stack
  682.     MenuBarHook - (see I-356)
  683.         Register & Stack Based; input on the stack; output in D0
  684.         
  685.  
  686. */
  687.  
  688. #if forInterfacerTool
  689. #else
  690. #define SPECIAL_CASE_PROCINFO(specialCaseCode)  \
  691.     (kSpecialCase | ((ProcInfoType)(specialCaseCode) << 4))
  692.  
  693. #endif
  694.  
  695. enum  {
  696.     kSpecialCase                = (CallingConventionType)0x0000000F
  697. };
  698.  
  699. enum  {
  700. // all of the special cases enumerated
  701.     kSpecialCaseHighHook        = 0,
  702.     kSpecialCaseCaretHook        = kSpecialCaseHighHook,
  703.     kSpecialCaseEOLHook            = 1,
  704.     kSpecialCaseWidthHook        = 2,
  705.     kSpecialCaseNWidthHook        = 3,
  706.     kSpecialCaseTextWidthHook    = kSpecialCaseWidthHook,
  707.     kSpecialCaseDrawHook        = 4,
  708.     kSpecialCaseHitTestHook        = 5,
  709.     kSpecialCaseTEFindWord        = 6,
  710.     kSpecialCaseProtocolHandler    = 7,
  711.     kSpecialCaseSocketListener    = 8,
  712.     kSpecialCaseTERecalc        = 9,
  713.     kSpecialCaseTEDoText        = 10,
  714.     kSpecialCaseGNEFilterProc    = 11,
  715.     kSpecialCaseMBarHook        = 12
  716. };
  717.  
  718.  
  719. /*
  720. ##§## */
  721.  
  722.  
  723. ///
  724.  
  725.  
  726. ///
  727.  
  728.  
  729. ///        MIXED MODE TOOLBOX DEFINITIONS
  730.  
  731.  
  732. ///        ——————————————————————————————
  733.  
  734.  
  735. ///
  736.  
  737. enum  {
  738. // the Mixed Mode error codes
  739.     mmInternalError                = -2526
  740. };
  741.  
  742. typedef short MMErrType;
  743.  
  744. #if defined(powerc) || defined(__powerc)
  745. #define GetCurrentISA() ((ISAType) kPowerPCISA)
  746.  
  747. #else
  748. #define GetCurrentISA() ((ISAType) kM68kISA)
  749.  
  750. #endif
  751.  
  752. #ifdef __cplusplus
  753. extern "C" {
  754. #endif
  755.  
  756. #ifndef BUILDING_INTERFACER
  757. #if USESROUTINEDESCRIPTORS
  758. extern pascal UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
  759.  THREEWORDINLINE(0x303C, 0x0000, 0xAA59);
  760. #else
  761. #define NewRoutineDescriptor(theProc, theProcInfo, theISA) (theProc)
  762.  
  763. #endif
  764.  
  765. #if USESROUTINEDESCRIPTORS
  766. extern pascal void DisposeRoutineDescriptor(UniversalProcPtr theProcPtr)
  767.  THREEWORDINLINE(0x303C, 0x0001, 0xAA59);
  768. #else
  769. #define DisposeRoutineDescriptor(theProcPtr)
  770.  
  771. #endif
  772.  
  773.  
  774. /* Note that the call to NewFatRoutineDescriptor is undefined
  775.    when USESROUTINEDESCRIPTORS is false. */
  776.  
  777. #if USESROUTINEDESCRIPTORS
  778. extern pascal UniversalProcPtr NewFatRoutineDescriptor(ProcPtr theM68kProc, ProcPtr thePowerPCProc, ProcInfoType theProcInfo)
  779.  THREEWORDINLINE(0x303C, 0x0002, 0xAA59);
  780. #endif
  781.  
  782. extern long CallUniversalProc(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ...);
  783. extern long CallOSTrapUniversalProc(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ...);
  784. #endif
  785.  
  786. #ifdef __cplusplus
  787. }
  788. #endif
  789.  
  790. #endif
  791.  
  792.